package cn.iocoder.yudao.module.bpm.dal.mysql.definition;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmProcessDefinitionExtDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.Collection;
import java.util.List;

/**
 * bpm流程定义ext映射器
 *
 * @author huangweidong
 * @date 2023/05/09
 */
@Mapper
public interface BpmProcessDefinitionExtMapper extends BaseMapperX<BpmProcessDefinitionExtDO> {

    /**
     * 查询列表通过过程定义id
     *
     * @param processDefinitionIds 流程定义id
     * @return {@code List<BpmProcessDefinitionExtDO>}
     */
    default List<BpmProcessDefinitionExtDO> selectListByProcessDefinitionIds(Collection<String> processDefinitionIds) {
        return selectList("process_definition_id", processDefinitionIds);
    }

    /**
     * 查询通过过程定义id
     *
     * @param processDefinitionId 流程定义id
     * @return {@code BpmProcessDefinitionExtDO}
     */
    default BpmProcessDefinitionExtDO selectByProcessDefinitionId(String processDefinitionId) {
        return selectOne("process_definition_id", processDefinitionId);
    }

}
